package com.dci.intellij.dbn2.extension;

import com.intellij.openapi.extensions.ExtensionPointName;
import com.intellij.openapi.project.Project;

import java.util.ArrayList;
import java.util.List;

public class ExtensionPointUtils {
    private static final ExtensionPointName<DBObjectBundleListener> dbObjectListenerEp = ExtensionPointName.create("DBN.extension.dbn2EpDBObjectBundleListener");

    public static List<DBObjectBundleListener> getDbObjectListeners(Project project) {
        try {
            return dbObjectListenerEp.getExtensionList(project);
        } catch (Exception ex) {
            //ignore
            return new ArrayList<>();
        }
    }
}
